<div class="panel blank-panel">
    <div class="panel-heading">
        <div class="panel-options">
            <ul class="nav nav-tabs">
                <li ><a href="#tab-1" data-toggle="tab" aria-expanded="false">${_res["project.content.one"]}</a>
                </li>
                <li class="active"><a href="#tab-2" data-toggle="tab" aria-expanded="false">${_res["project.content.two"]}</a>
                </li>
                <li><a href="#tab-3" data-toggle="tab" aria-expanded="false">${_res["project.content.three"]}</a>
                </li>
            </ul>
        </div>
    </div>
	<form method="post" class="form-horizontal" action="${cxt!}/admin/project/addProject" id="projectBasic">
	    <div class="panel-body">
	        <div class="tab-content">
	            <div class="tab-pane " id="tab-1">
	                 <div class="form-group">
	                      <label class="col-md-2 control-label text-left"><span class="remarkStar">*</span>${_res["project.content.name"]}:</label>
	                      <div class="col-md-4">
	                          <input type="text" class="form-control" name="project.name" required aria-required="true">
	                      </div>
	                  </div>
	                  <div class="form-group">
	                      <label class="col-md-2 control-label text-left"><span class="remarkStar">*</span>${_res["project.content.address"]}:</label>
	                      <div class="col-md-10">
	                         <div class="row">
	                           <div class="col-md-3">
	                              <#dict type="select" name="project.country"  table="country_region" filedName="name" filedValue="code"   defaultValue="${paramMap['project.country']}"/>
	                          </div>
	                          <div class="col-md-3">
	                             <#dict type="select" name="project.address"  table="country_region_state" filedName="name" filedValue="code"   defaultValue="${paramMap['project.address']}"/>
	                          </div>
	                          <div class="col-md-3">
	                              <#dict type="select" name="project.city"  table="country_region_city" filedName="name" filedValue="code"   defaultValue="${paramMap['project.city']}"/>
	                          </div>
	                          <div class="col-md-3">
	                              <input type="text" class="form-control" name="project.address" required aria-required="true">
	                          </div>
	                         </div>
	                      </div>
	                  </div>
	                  <div class="form-group">
	                      <label class="col-md-2 control-label text-left"><span class="remarkStar">*</span>${_res["project.content.longitude"]}:</label>
	                      <div class="col-md-4">
	                          <input type="text" class="form-control" name="project.longitude" required aria-required="true">
	                      </div>
	                  </div>
	                   <div class="form-group">
	                      <label class="col-md-2 control-label text-left"><span class="remarkStar">*</span>${_res["project.content.latitude"]}:</label>
	                      <div class="col-md-4">
	                          <input type="text" class="form-control" name="project.latitude" required aria-required="true">
	                      </div>
	                  </div>
	                  <div class="form-group">
	                      <label class="col-md-2 control-label text-left"><span class="remarkStar">*</span>${_res["project.content.type"]}:</label>
	                      <div class="col-md-4">
	                      <#dict type="select" name="project.type"  table="project_type" filedName="value" filedValue="code"   defaultValue="${paramMap['project.f_status']}"/>
	                      </div>
	                  </div>
	                   <div class="form-group">
	                      <label class="col-md-2 control-label text-left"><span class="remarkStar">*</span>${_res["project.content.management"]}:</label>
	                      <div class="col-md-4">
	                          <input type="text" class="form-control" name="project.propertyManagement" required aria-required="true">
	                      </div>
	                  </div>
	                  <div class="form-group">
	                      <div class="col-md-12">
	                          <div class="row">
	                          <label class="col-md-2 control-label text-left"><span class="remarkStar">*</span>${_res["project.content.builder"]}:</label>
	                            <div class="col-md-4">
	                              <input type="text" class="form-control" name="project.builder" required aria-required="true">
	                            </div>
	                             <label class="col-md-2 control-label text-right"><span class="remarkStar">*</span>${_res["project.content.developers"]}:</label>
	                            <div class="col-md-4">
	                              <input type="text" class="form-control" name="project.developer" required aria-required="true">
	                            </div>
	                          </div>
	                      </div>
	                  </div>
	                  <div class="form-group">
	                      <div class="col-md-12">
	                          <div class="row">
	                          <label class="col-md-2 control-label text-left"><span class="remarkStar">*</span>${_res["project.content.printFrom"]}:</label>
	                            <div class="col-md-4">
	                              <input type="text" class="form-control" name="project.priceFrom" required aria-required="true">
	                            </div>
	                             <label class="col-md-2 control-label text-right"><span class="remarkStar">*</span>${_res["project.content.printTo"]}:</label>
	                            <div class="col-md-4">
	                              <input type="text" class="form-control" name="project.priceTo" required aria-required="true">
	                            </div>
	                          </div>
	                      </div>
	                  </div>
	                  <div class="form-group">
	                      <div class="col-md-12">
	                          <div class="row">
	                          <label class="col-md-2 control-label text-left"><span class="remarkStar">*</span>${_res["project.content.number"]}:</label>
	                            <div class="col-md-4">
	                              <input type="text" class="form-control" name="project.number" required aria-required="true">
	                            </div>
	                             <label class="col-md-2 control-label text-right"><span class="remarkStar">*</span>DA:</label>
	                            <div class="col-md-4">
	                              <input type="text" class="form-control" name="project.da" required aria-required="true">
	                            </div>
	                          </div>
	                      </div>
	                  </div>
	                  <div class="form-group">
	                      <div class="col-md-12">
	                          <div class="row">
	                          <label class="col-md-2 control-label text-left"><span class="remarkStar">*</span>${_res["project.content.startTime"]}:</label>
	                            <div class="col-md-4">
	                            <input type="text" class="form-control layer-date laydate-icon" onclick="laydate()" name="project.beginningDate" required aria-required="true"/>
	                            </div>
	                             <label class="col-md-2 control-label text-right"><span class="remarkStar">*</span>${_res["project.content.launchTime"]}:</label>
	                            <div class="col-md-4">
	                              <input type="text" class="form-control layer-date laydate-icon" onclick="laydate()" name="project.launchDate"  required aria-required="true"/>
	                            </div>
	                          </div>
	                      </div>
	                  </div>
	                  <div class="form-group">
	                      <label class="col-md-2 control-label text-left"><span class="remarkStar">*</span>${_res["project.content.introduction"]}:</label>
	                      <div class="col-md-10">
	                          <textarea class="form-control" name="project.description" required aria-required="true"></textarea>
	                      </div>
	                  </div>
	                  <div class="form-group">
	                      <label class="col-md-2 control-label text-left"><span class="remarkStar">*</span>${_res["project.content.planning"]}:</label>
	                      <div class="col-md-10">
	                          <textarea class="form-control" name="project.cityAndCellPlan" required aria-required="true"></textarea>
	                      </div>
	                  </div>
	                   <div class="form-group">
	                   <div class="col-md-12">
	                   <div class="row">
	                   	  <label class="col-md-2 control-label text-left"><span class="remarkStar">*</span>${_res["project.content.bedRoom"]}:</label>
	                      <div class="col-md-1">
	                      <input type="text" class="form-control" name="bedRoomNum1" required aria-required="true">
	                      </div>
	                      <label class="col-md-2 control-label text-left"><span class="remarkStar">*</span>${_res["project.content.hall"]}:</label>
	                      <div class="col-md-1">
	                      <input type="text" class="form-control" name="livingRoomNum1" required aria-required="true">
	                      </div>
	                       <label class="col-md-2 control-label text-left"><span class="remarkStar">*</span>${_res["project.content.bathRoom"]}:</label>
	                      <div class="col-md-1">
	                      <input type="text" class="form-control" name="bathRoomNum1" required aria-required="true">
	                      </div>
	                       <label class="col-md-2 control-label text-left"><span class="remarkStar">*</span>${_res["project.content.parkingSpace"]}:</label>
	                      <div class="col-md-1">
	                      <input type="text" class="form-control" name="parkingspace1" required aria-required="true">
	                      </div>
	                   </div>
	                   </div>
	                  </div>
	                  <div class="form-group">
	                      
	                      <div class="col-md-12">
	                        <div class="row">
	                        <label class="col-md-2 control-label text-left"><span class="remarkStar">*</span>${_res["project.content.rent"]}:</label>
	                          <div class="col-md-4">
	                          <div class="row">
	                            <div class="col-md-12">
	                              <div class="row">
	                                  <div class="col-md-7">
	                                      <input type="text" class="form-control layer-date laydate-icon" onclick="laydate()" name="projectItemRents" required aria-required="true"/>
	                                  </div>
	                                  <div class="col-md-5">
	                                    <div class="curryWrap">
	                                      <input type="text" placeholder="5000" class="form-control" name="projectItemRentsValue" required aria-required="true">
	                                      <span class="currency">AUD</span>
	                                    </div>
	                                  </div>
	                                </div>
	                                <div class="row">
	                                  <div class="col-md-7">
	                                      <input type="text" class="form-control layer-date laydate-icon" onclick="laydate()" name="projectItemRents"  required aria-required="true"/>
	                                  </div>
	                                  <div class="col-md-5">
	                                    <div class="curryWrap">
	                                      <input type="text" placeholder="5000" class="form-control" name="projectItemRentsValue" required aria-required="true">
	                                      <span class="currency">AUD</span>
	                                    </div>
	                                  </div>
	                                </div>
	                                <div class="row">
	                                  <div class="col-md-7">
	                                    <input type="text" class="form-control layer-date laydate-icon" onclick="laydate()" name="projectItemRents" required aria-required="true"/>
	                                  </div>
	                                  <div class="col-md-5">
	                                    <div class="curryWrap">
	                                      <input type="text" placeholder="5000" class="form-control" name="projectItemRentsValue" required aria-required="true">
	                                      <span class="currency">AUD</span>
	                                    </div>
	                                  </div>
	                                </div>
	                              </div>
	                          </div>
	                          </div>
	
	                          <label class="col-md-2 control-label text-right"><span class="remarkStar">*</span>${_res["project.content.appreciation"]}:</label>
	                          <div class="col-md-4">
	                          <div class="row">
	                            <div class="col-md-12">
	                              <div class="row">
	                                  <div class="col-md-7">
	                                      <input type="text" class="form-control layer-date laydate-icon" onclick="laydate()" name="projectItemAppreciation" required aria-required="true"/>
	                                  </div>
	                                  <div class="col-md-5">
	                                    <div class="curryWrap">
	                                      <input type="text" placeholder="5000" class="form-control" name="projectItemAppreciationValue" >
	                                      <span class="currency">AUD</span>
	                                    </div>
	                                  </div>
	                                </div>
	                                <div class="row">
	                                  <div class="col-md-7">
	                                     <input type="text" class="form-control layer-date laydate-icon" onclick="laydate()" name="projectItemAppreciation"  required aria-required="true"/>
	                                  </div>
	                                  <div class="col-md-5">
	                                    <div class="curryWrap">
	                                      <input type="text" placeholder="5000" class="form-control" name="projectItemAppreciationValue" >
	                                      <span class="currency">AUD</span>
	                                    </div>
	                                  </div>
	                                </div>
	                                <div class="row">
	                                  <div class="col-md-7">
	                                    <input type="text" class="form-control layer-date laydate-icon" onclick="laydate()" name="projectItemAppreciation" required aria-required="true"/>
	                                  </div>
	                                  <div class="col-md-5">
	                                    <div class="curryWrap">
	                                      <input type="text" placeholder="5000" class="form-control" name="projectItemAppreciationValue" >
	                                      <span class="currency">AUD</span>
	                                    </div>
	                                  </div>
	                                </div>
	                              </div>
	                          </div>
	                          </div>
	                          </div>
	                      </div>
	                  </div>
	            </div>
	            <div class="tab-pane active" id="tab-2">
	              <div class="form-group">
	                 <div class="col-md-12">
	                     <div class="row m-b-md">
	                          <h4><span class="remarkStar">*</span>${_res["project.content.twoSub"]}:</h4>
	                          <div class="col-md-12">
	                            <div class="row m-t-md proimgfilesWrap">
	                              <div class="col-md-2 proimgfiles">
	                                 <a href="javascript:void(0)" class="filesIconAdd" ></a>
	                                 <input type="file" style="opacity:0" id="fileToUpload"  required aria-required="true">
	                              </div>
	                              <div class="col-md-8">
	                                <ul>
	                                  <li>
	                                    <img src="img/a1.jpg">
	                                    <span>The Name</span>
	                                    <button type="button" class="btn btn-default pull-right">${_res["project.content.delete"]}</button>
	                                  </li>
	                                 <li>
	                                    <img src="img/a1.jpg" >
	                                    <span>The Name</span>
	                                    <button type="button" class="btn btn-default pull-right">Delete</button>
	                                  </li>
	                                  <li>
	                                    <img src="img/a1.jpg" >
	                                    <span>The Name</span>
	                                    <button type="button" class="btn btn-default pull-right">Delete</button>
	                                  </li>
	                                </ul>
	                              </div>
	                             
	                            </div>
	                            
	                          </div>
	                      </div>
	                      
	                  </div>
	              </div>
	              <div class="hr-line-solid"></div>
	              <div class="form-group">
	                 <div class="col-md-12">
	                     <div class="row m-b-md">
	                          <h4><span class="remarkStar">*</span>${_res["project.content.twoSub"]}:</h4>
	                          <div class="col-md-12">
	                            <div class="row m-t-md proimgfilesWrap">
	                              <div class="col-md-2 proimgfiles">
	                                 <a href="javascript:void(0)" class="filesIconAdd" id="uploadproimgfiles"></a>
	                                 <input type="file"  style="opacity:0" id="fileuploadproimgfiles" name="fileuploadproimgfiles">
	                              </div>
	                              <div class="col-md-8" id="fileuploadproimgfilesDiv">
	                              	<%
									//ajax片段开始
									#ajax fileuploadproimgfiles: {
									%>
	                                <ul>
										<%for(uploadFile in uploadFiles!){%>
										  <li>
										    <img src="${imgCxt!}/${uploadFile.path!}" >
		                                    <span>${uploadFile.originalFileName!}</span>
		                                    <button type="button" class="btn btn-default pull-right" onclick="removeImage(this);">${_res["project.content.delete"]}</button>
		                                  </li>
	                                    <%}%>
	                                 </ul>
	                                 <%
										}//ajax片段结尾
									  %>
	                              </div>
	                             
	                            </div>
	                            
	                          </div>
	                      </div>
	                      
	                  </div>
	              </div>
	              <div class="hr-line-solid"></div>
	               <div class="form-group">
	                <label class="col-md-12 control-label"><span class="remarkStar">*</span>${_res["project.content.twoSub1"]} <small>${_res["project.content.url"]}</small></label>
	                <div class="col-md-9">
	                  <input type="text" class="form-control" name="project.vedioURL" required aria-required="true">
	                </div>
	                <div class="col-md-3">
	                  <button type="button" class="btn btn-BlueBorder">${_res["project.content.upload"]}</button>
	                </div>
	                <p class="fontColor999 m-l-md">${_res["project.content.urlContent"]}</p>
	              </div>
	            </div>
	            <div class="tab-pane " id="tab-3">
	                 <div class="form-group">
	                      <label class="col-md-2 control-label text-left">${_res["project.content.vacancyRate"]}:</label>
	                      <div class="col-md-4">
	                          <input type="text" class="form-control" name="project.vacancyRate" >
	                      </div>
	                      <div class="col-md-1 control-label text-left p-l-none">%</div>
	                  </div>
	                  <div class="form-group">
	                      <label class="col-md-2 control-label text-left">${_res["project.content.highLights"]}:</label>
	                      <div class="col-md-2">
	                          <input type="text" class="form-control" name="project.investmentHighLight1" >
	                      </div>
	                      <div class="col-md-2">
	                          <input type="text" class="form-control" name="project.investmentHighLight2" >
	                      </div>
	                      <div class="col-md-2">
	                          <input type="text" class="form-control" name="project.investmentHighLight3" >
	                      </div>
	                      <div class="col-md-2">
	                          <input type="text" class="form-control" name="project.investmentHighLight4" >
	                      </div>
	                  </div>
	                  <div class="form-group">
	                      <label class="col-md-2 control-label text-left">${_res["project.content.FAQ"]}:</label>
	                      <div class="col-md-10">
	                        <div class="row ">
	                          <div class="col-md-12">
	                          <div class="inputWrap">
	                          <input type="text" class="form-control m-b-sm" name="projectQuestion" required aria-required="true">
	                          <span>Q:</span>
	                          </div>
	                          <div class="inputWrap">
	                          <textarea class="form-control" name="projectAnswer"></textarea>
	                          <span>A:</span>
	                          </div>
	                          <div class="col-md-12">
	                        </div>
	                        <div class="row m-t-md">
	                          <div class="col-md-12">
	                          <div class="inputWrap">
	                          <input type="text" class="form-control m-b-sm" name="projectQuestion" required aria-required="true">
	                          <span>Q:</span>
	                          </div>
	                          <div class="inputWrap">
	                          <textarea class="form-control" name="projectAnswer"></textarea>
	                          <span>A:</span>
	                          </div>
	                          <div class="col-md-12">
	                        </div>
	                      </div>
	                     </div>
	                    </div>
	                   </div>
	                  </div>
	                   <div class="row">
	                      <div class="col-md-10 col-md-offset-2">
	                         <p class="m-l-sm m-t-sm font1p8rem fontstyleNormal">+ <a href="javascript:void(0);" class="fontColor00bebe">Add</a></p>
	                      </div>
	                  </div>
	                  </div>
	                  <div class="form-group">
	                      <div class="col-md-12">
	                        <div class="row">
	                        <label class="col-md-2 control-label text-left">${_res["project.content.preferntial"]}:</label>
	                          <div class="col-md-6">
	
	                              <div class="row">
	                                  <div class="col-md-6">
	                                      <select class="form-control" name="preferntialKey">
	                                        <option>VIP Investor</option>
	                                        <option>2</option>
	                                        <option>3</option>
	                                        <option>4</option>
	                                        <option>5</option>
	                                      </select>
	                                  </div>
	                                  <div class="col-md-6">
	                                    <div class="curryWrap">
	                                      <input type="text" placeholder="5000" class="form-control" name="preferntialValue" >
	                                      <span class="currency">AUD</span>
	                                    </div>
	                                  </div>
	                                </div>
	                                <div class="row">
	                                  <div class="col-md-6">
	                                      <select class="form-control" name="preferntialKey">
	                                        <option>VIP Investor</option>
	                                        <option>2</option>
	                                        <option>3</option>
	                                        <option>4</option>
	                                        <option>5</option>
	                                      </select>
	                                  </div>
	                                  <div class="col-md-6">
	                                    <div class="curryWrap">
	                                      <input type="text" placeholder="5000" class="form-control" name="preferntialValue" >
	                                      <span class="currency">AUD</span>
	                                    </div>
	                                  </div>
	                                </div>
	                                <div class="row">
	                                  <div class="col-md-6">
	                                      <select class="form-control" name="preferntialKey">
	                                        <option>VIP Investor</option>
	                                        <option>2</option>
	                                        <option>3</option>
	                                        <option>4</option>
	                                        <option>5</option>
	                                      </select>
	                                  </div>
	                                  <div class="col-md-6">
	                                    <div class="curryWrap">
	                                      <input type="text" placeholder="5000" class="form-control" name="preferntialValue" >
	                                      <span class="currency">AUD</span>
	                                    </div>
	                              </div>
	                          </div>
	                          </div>
	                          </div>
	                      </div>
	                  </div>
	                 <div class="form-group">
	                 <div class="col-md-12">
	                     <div class="row">
	                          <label class="col-md-2 control-label text-left">${_res["project.content.projectFile"]}:</label>
	                          <div class="col-md-6 m-b-md">
	                            <input class="form-control" placeholder="Name" >
	                            <div class="row m-t-md proimgfilesWrap">
	                              <div class="col-md-2 proimgfiles">
	                                 <a href="javascript:void(0)" class="filesIconAdd" ></a>
	                                 <input type="file" style="opacity:0" id="fileToUpload"  >
	                                 
	                                 <a href="javascript:void(0)" class="filesIconAdd" id="uploadproimgfiles1"></a>
	                                 <input type="file"  style="opacity:0" id="fileuploadproimgfiles1" name="fileuploadproimgfiles1">
	                              </div>
	                              <div class="col-md-8" id="uploadproimgfiles1">
	                                <ul>
									<%//ajax片段开始
									#ajax uploadproimgfiles1: {
									%>
	                                <ul>
										<%for(uploadFile in uploadFiles!){%>
										  <li>
										    <img src="${imgCxt!}/${uploadFile.path!}" >
		                                    <span>${uploadFile.originalFileName!}</span>
		                                    <button type="button" class="btn btn-default pull-right" onclick="removeImage(this);">${_res["project.content.delete"]}</button>
		                                  </li>
	                                    <%}%>
	                                 </ul>
	                                 <%
										}//ajax片段结尾
									  %>
	                                </ul>
	                              </div>
	                              <p class="fontColor999 m-l-sm">Size does not exceed 2M, the format of Excel,Word,Pdf</p>
	                            </div>
	                          </div>
	                      </div>
							<div class="row m-t-lg">
								<div class="col-md-4">
									<button type="submit" class="btn btn-Blue btn-block m-l-sm">${_res["project.content.submit"]}</button>
								</div>
							</div>
						</div>
	                  </div>
	            </div>
	        </div>
	    </div>
	</form>
</div>
<#submit  formId="projectBasic"  divId="content" />

<script>
$(document).ready(function(){
	$("a[id^='upload']").on('click', function() {
		var id = $(this).attr("id");
		$("#file" + id).click();
	});
	// 选择文件之后执行上传
	$("input[id^='fileupload']").on("change", function() {
		var fileElementId = $(this).attr("id");;
		$.ajaxFileUpload({
			url : cxt + '/admin/project/ajaxUploadproimgfiles',
			secureuri : false,
			fileElementId : fileElementId,// file标签的id
			dataType : 'html',// 返回数据的类型
			data : {
				uploadFile : fileElementId,
			    uploadType :  'project'
			},// 一同上传的数据
			success : function(data, status) {
				console.log("#"+fileElementId + "Div");
			  $("#"+fileElementId + "Div").html(data);
			},
			error : function(data, status, e) {
			}
		});
	});

});

function removeImage(imageObj){
   $(imageObj).parent().remove();
};
</script>
